/***********************************************************************
 * Module:  Role.java
 * Author:  guazi
 * Purpose: Defines the Class Role
 ***********************************************************************/
package com.li.sssp.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@Entity

/** @pdOid 9334a710-baf5-49bc-b4b0-5cef1fef5659 */
public class Role {
	/** @pdOid e82df9bc-7866-416e-bdab-77619e74e87c */
	private int id;
	/** @pdOid 8ed966fd-52f1-4f46-8fe9-2f150ac69c61 */
	private String name;
	/** @pdOid c4b8142a-3b28-46d2-84d4-7bdad3bd358e */
	private String c;

	/**
	 * @pdRoleInfo migr=no name=Actor assc=association3 mult=0..1
	 *             type=Aggregation
	 */
	public Actor actor;
	/**
	 * @pdRoleInfo migr=no name=Module assc=association4 mult=0..1
	 *             type=Aggregation
	 */
	public Module module;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getC() {
		return c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
	@ManyToOne(fetch = FetchType.LAZY,cascade={CascadeType.REFRESH})
	@JoinColumn(name = "Actor_id")
	public Actor getActor() {
		return actor;
	}

	public void setActor(Actor actor) {
		this.actor = actor;
	}

	@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
	@ManyToOne(fetch = FetchType.LAZY,cascade={CascadeType.REFRESH})
	@JoinColumn(name = "Module_id")
	public Module getModule() {
		return module;
	}

	public void setModule(Module module) {
		this.module = module;
	}

}